package com.wpw.web.base;

/**
 * @Description:
 * @ClassName: CompareTest
 * @CreateDate: 2020-06-06 22:57
 * @author: wupengwei
 */
public class CompareTest {

    public static void main(String[] args) {
        System.out.println("开始");
        CompareStudent d = new CompareStudent();
        System.out.println("结束");
    }

}

class CompareStudent implements Comparable<CompareStudent> {

    private String name;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int compareTo(CompareStudent o) {
        return this.name.compareTo(o.getName());
    }


}